H.264/Moving Picture Experts Group (MPEG)-4 Advanced Video Coding (AVC), hereinafter referred to as H.264, has been known as a method of compression recording of a moving image. H.264 is widely used in one-segment digital terrestrial broadcasting and other applications. H.264 is characterized by the provision of a plurality of intra prediction capabilities, using integer transforms in units of 4×4 pixels in addition to conventional coding schemes (see ISO/IEC 14496-10: 2004 Information technology—Coding of audio-visual objects—Part 10: Advanced Video Coding, ITU-T H.264 Advanced video coding for generic audiovisual services).
Coding schemes using an orthogonal transform and quantization, typified by MPEG-2 and H.264, perform an orthogonal transform and quantization on predetermined block images to generate quantization coefficient data. For image quality control, the quantization is performed by using an image quality control parameter called quantization parameter. Specifically, quantization using a small quantization parameter value produces improved image quality but with a large amount of code. Quantization with a large quantization parameter value produces low image quality with a reduced amount of code. Optimum quantization parameter values are selected for coding according to a target amount of code. Such control is referred to as rate control. Various rate control methods have been discussed, including TM5. After the quantization, the quantization coefficient data is subjected to variable-length coding to generate coded coefficient data.
Quantization parameters are also coded to generate quantization parameter code. For example, H.264 uses a difference value between a quantization parameter that is used to quantize a block preceding a target block and a quantization parameter that is used to quantize the target block. The difference value is referred to as quantization parameter delta (QP_DELTA). QP_DELTA calculated is coded into QP_DELTA code by Golomb coding or arithmetic coding. For example, the QP_DELTA code codec by Golomb coding produces one bit of code even if the difference value is 0. The coded coefficient data and the quantization parameter code thus generated are transmitted to a decoder. The decoder decodes the coded coefficient data and the quantization parameter code to generate quantization coefficient data and quantization parameters. The decoder then performs inverse quantization and an inverse orthogonal transform on the quantization coefficient data by using the quantization parameters, thereby generating a decoded image.
A single unit of processing in MPEG-2 and H.264 is called a macroblock. Macroblocks are lattice blocks of 16×16 pixels into which an image is divided in a lattice pattern. In terms of pixels, blocks to be orthogonally transformed in MPEG-2 have a size of 8×8 pixels, and H.264 a size of 8×8 pixels or 4×4 pixels. That is, a single macroblock includes a plurality of orthogonal transform blocks. MPEG-2 and H.264 can control (rate control) quantization parameters in units of macroblocks. Orthogonal transform blocks included in the same macroblock are quantized with the same quantization parameter. According to an improved technology of H.264, an image is divided in a lattice pattern into lattice blocks called largest coding tree blocks (LCTBs). An LCTB has a size of 64×64 pixels. LCTBs are divided into blocks of smaller sizes called coding tree blocks (CTBs) by using a region quadtree structure. To search or input/output tree-structured data, the scan order needs to be specified. A CTB includes orthogonal transform blocks called transform units (TUs). TUs can also be divided into smaller sizes by using a region quadtree structure. Each unit has a division flag. A block having a division flag of true is structured to include four divisional blocks having a size ½ in height and width. A block having a division flag of false includes no divisional block and contains actual data on the block instead. In other words, only undivided TUs contain coefficient data on image blocks. An LCTB (lattice block) includes a plurality of hierarchically structured blocks of different orthogonal transform sizes. Whether to divide a block can be determined by various methods. One of the determination methods is discussed in Japanese Patent Application Laid-Open No. 2005-191706, which includes using Lagrange multipliers to calculate block costs and selecting a block division method of lower cost.
Suppose that an image coding method includes coding an image in units of lattice blocks into which the image is divided in a lattice pattern. If the lattice blocks are large in size and image quality control is performed in units of lattice blocks, boundaries between blocks of different image qualities may become noticeable.
Image quality parameters are coded and transmitted regardless of whether the image quality parameter changes. If lattice blocks are subdivided into smaller units for image quality control, there is a problem of overhead caused by the image quality parameter code.